package org.argeproje.resim.proc.input;

import javax.media.jai.JAI;
import javax.media.jai.PlanarImage;

import org.argeproje.resim.proc.ConnectionRule;
import org.argeproje.resim.proc.data.*;




public class ImageInputPR extends InputPR {
     protected String _file;
 	 protected void setConnectionRules(ConnectionRule connRule){
		connRule.addOutType(ImageDA.class);
	 }
     public void setParameters(String file){
    	 setParamFile(file);
     }
	 public void setParamFile(String file){
    	 _file = file;
     }
     public String getParamFile(){
    	 return _file;
     }
    public Data process() {
		PlanarImage im = JAI.create("fileload", getParamFile());
		ImageDA imData = new ImageDA(im);
		setOutput(imData);
		return getOutput();
	}
}
